package com.xjtu.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.io.Serializable;

@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class EditUserDto implements Serializable {

    @Min(value = 1,message = "id异常")
    private Integer id;

    @NotBlank(message = "名字不能为空")
    private String name;
    /**
     * 员工手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String phone;

    @Min(value = 0,message = "状态值只能为0/1")
    @Max(value = 1,message = "状态值只能为0/1")
    private Integer status;
}
